factoring by decomposition